<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<style>
			
			/* 初始样式 */
			
			/* 隐藏按钮 */
			.btn{
				display: none;
			}
			.sub-nav{
				/* 弹性盒子 */
				display: flex;
				/* 水平分散对齐 */
				justify-content: space-around;
				background-color: black;
				padding: 1rem 6rem;
			}
			.sub-nav>div{
				background-color: #fff;
				border-radius: 5px;
				padding: 0.5rem;
			}
			
			/* 当屏幕宽度小于800px */
			@media screen and (max-width:799px) {
				/* 改变.sub-nav的左右内边距 */
				.sub-nav{
					padding: 1rem 0;
				}
			}
			
			/* 当屏幕宽度宽度520px时 */
			@media screen and (max-width:519px) {
				/* 显示按钮 */
				.btn{
					display: block;
				}
				/* 隐藏菜单 */
				.sub-nav{
					display: none;
					/* 自动换行 */
					flex-wrap: wrap;
				}
				/* 点击时显示菜单 */
				.nav:hover .sub-nav{
					display: flex;
				}
				
				/* 让.sub-nav的子元素一行显示一个 */
				.sub-nav>div{
					/* 自动放大 */
					flex: 1;
					/* 初始宽度 */
					flex-basis: 90%;
					margin: 0.5rem 1rem;
				}
			}
		</style>
	</head>
	<body>
		
		<div class="nav">
			<img class="btn" src="./img/1.png" alt="">
			<div class="sub-nav">
				<div>Admaster</div>
				<div>Admaster</div>
				<div>Admaster</div>
				<div>Admaster</div>
				<div>Admaster</div>
				<div>Admaster</div>
			</div>
		</div>
	</body>
</html>